import request from '@/utils/request';
import { FillBusinessForm, FillDTO } from '@/api/fill/business/Types';
import { FillActFrom } from '@/api/fill/management/Types';

//列表显示全部
export const getListBusinessAll = (data?: FillDTO) => {
  return request({
    url: '/fillBusinessTwo/getListAll',
    method: 'post',
    data: data
  });
};

//下达数据列表
export const getListIssueAll = (data?: FillDTO) => {
  return request({
    url: '/fillBusinessTwo/getListIssueAll',
    method: 'post',
    data: data
  });
};

//添加列表显示
export const getListBusiness = (data: any) => {
  return request({
    url: '/fillBusinessTwo/getList',
    method: 'post',
    data: data
  });
};

//保存/编辑
export const saveOrUpdateNew = (data?: FillBusinessForm) => {
  return request({
    url: '/fillBusinessTwo/saveOrUpdateNew',
    method: 'post',
    data: data
  });
};

//提交
export const submitAll = (data?: FillActFrom) => {
  return request({
    url: '/fillBusinessTwo/submitAll',
    method: 'post',
    data: data
  });
};
/**
 * 校验是否提交
 * @param data
 */
export const getInfo = (data?: FillDTO) => {
  return request({
    url: '/fillBusinessTwo/verify',
    method: 'post',
    data: data
  });
};
/**
 * 查询详情
 * @param id
 */
export const getFillActBusinessDetail = (id?: any) => {
  return request({
    url: '/fillBusinessTwo/getById/+' + id,
    method: 'get',
    params: id
  });
};
